﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            //loads the user's avatar at the top of the page
            if ((Session["username"] != null) && (Session["username"].ToString().CompareTo("") != 0))
            {
                String username = Session["username"].ToString();
                var Client = new BusinessTier.DataManipulation();
                user_status.Username = username;
                user_status.img_url = (string)Client.LoadAvatar(username); //getting the avatar if any
            }
        }
    }
}
